package sufutian.com.frameworkdemo.network;

import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by sufutian on 2017/6/6.
 */

public class VideoBuiness {
    private static final VideoBuiness ourInstance = new VideoBuiness();

    public static VideoBuiness getInstance() {
        return ourInstance;
    }

    private VideoBuiness() {

    }

    String test="{\"isBlack\":0,\"userinfo\":{\"id\":83281377,\"attest\":0,\"nickname\":\"天籁你天哥\",\"headImage\":\"http://t8.tianlaikge.com/upload_files/images/360_270/20170223/6ccc0fed-075f-48e4-b585-b8532ab0847a.jpg\",\"cover\":\"http://t9.tianlaikge.com/upload_files/images/640_480/20160815/a05478d8-def3-4880-8288-bf85052dc04e.jpg\",\"sex\":1,\"hot_num\":0,\"level\":31,\"nick_pindex\":\"TLNTG\",\"attestUrl\":\"\",\"title\":\"1\",\"constellations\":\"8\",\"introduction\":\"宝宝不哭\",\"exp\":15174,\"birthday\":\"2000-01-01\",\"groupTips\":\"\",\"decorate\":{\"badgeUrl\":\"\",\"headPendantUrl\":\"\",\"nickNameColor\":\"\",\"haveMessageBoard\":0},\"mvNum\":3,\"playNum\":33,\"attentionNum\":58,\"fansNum\":26,\"privateNum\":40,\"chorusmvNum\":0,\"chorusresNum\":0,\"singlemvNum\":3,\"forwardNum\":0,\"giftNum\":0,\"flowerNum\":2,\"commentNum\":3,\"picNum\":1,\"blackNum\":7,\"activityNum\":4,\"messageNum\":0,\"groupNum\":0,\"source\":3,\"ticket\":0,\"diamond\":0,\"coin\":0},\"result\":1,\"status\":1,\"position\":\"北京市\",\"management\":2,\"prohibitionType\":0}";
    public void getVideoList(String url, final LoadCallBack callBack, String tag){
        JSONObject object=new JSONObject();
        try {
            object.put("start",0);
            object.put("id",0);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        OkHttpEngine.getOkHttp().loadGet(url, new NetCallBack() {
            @Override
            public void onLoading() {
                callBack.onLoading();
            }

            @Override
            public void onLoadFial(String errorMsg) {
                Log.e("sufutian==", "onLoadFial: "+errorMsg );
                callBack.onLoadFial(errorMsg);
            }

            @Override
            public void onLoadSucess(Object result,Object tag) {
                Json json= (Json) result;
                LoadVideoResult videoResult=new LoadVideoResult();
                Json json1=new Json(test);
                videoResult.parseData(json1);

            }
        });
    }

}
